package com.example.venadaoa.net;


public class URLS {
    private static String NORMAL = "http://192.168.1.31/oa";
    private static String test = "http://192.168.8.26:8080/oa";
    private static String test2 = "http://192.168.1.118:8080/oa";
    private static String test3 = "http://192.168.8.27:8080/oa";
    private static String MY = "http://192.168.1.85:8080/oa";
    private static String luo = "http://192.168.1.117:8080/oa";
    private static String liu = "http://192.168.1.130:8080/oa";
    private static String zhengshi = "http://oa.venada.com.cn";
    private static String wang = "http://192.168.1.31:81/oa";
    public static String LOGIN = "/openapi/login";
    public static String TYPE_LINK = "/";
    public static String TYPE_LINK1 = "?";
    public static String TYPE_LINK2 = "&";


    public static String getHead() {
        return test;
    }

    public static String getLoginURL(String mobile, String password) {
        StringBuilder build = new StringBuilder(getHead());
        build.append(LOGIN).append(TYPE_LINK1).append("username=");
        build.append(mobile);
        build.append(TYPE_LINK2).append("password=").append(password);

        return build.toString();
    }

    //报销查询
    public static String getReimburseFind() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/reimbursement/find_list");
        return build.toString();
    }

    //登录
    public static String getLogin() {
        StringBuilder build = new StringBuilder(getHead());
        build.append(LOGIN);
        return build.toString();
    }

    //登出
    public static String getLoginOut() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/oa/logout");
        return build.toString();
    }

    //修改密码
    public static String getModifyPW() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/modify_pwd");
        return build.toString();
    }

    //获取当前用户信息
    public static String getCurrentUser() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/cur_user");
        return build.toString();
    }

    //上传头像
    public static String upLoadPhoto() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/upload_photo");
        return build.toString();
    }

    //获取头像
    public static String getPhoto() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/avatar");
        return build.toString();
    }

    //获取头像
    public static String getPhotoNew() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/get_head_photo");
        return build.toString();
    }

    //获取系统信息
    public static String getSystemInfo() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/app_config_info");
        return build.toString();
    }

    //报销申请
    public static String getReimburseStart() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/reimbursement/start");
        return build.toString();
    }

    //付款申请
    public static String getPaymentStart() {

        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/payforment/start");
        return build.toString();
    }

    //购买申请
    public static String getPurchaseStart() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/purchase/start");
        return build.toString();
    }

    //用章申请
    public static String getSealStart() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/sealApp/start");
        return build.toString();
    }

    //跟新用户
    public static String getUpdateUserInfo() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/update_user");
        return build.toString();
    }

    //借款申请
    public static String getBorrowStart() {

        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/borrow/start");
        return build.toString();
    }

    //获取任务列表
    public static String getTaskInfoByType(String type) {
        String uri = null;
        if (type.equals("my_reimburse_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/reimbursement/my_list");
            uri = build.toString();
        } else if (type.equals("all_reimburse_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/reimbursement/stat_list");
            uri = build.toString();
        } else if (type.equals("all_reimburse_todo") || type.equals
                ("all_payment_todo") || type.equals("all_borrow_todo")
                || type.equals("all_sealuse_todo") ||
                type.equals("all_purchase_todo") || type.equals("all_task_todo")
                || type.equals("all_leave_todo") || type.equals("all_overtime_todo")
                || type.equals("all_off_todo")
                || type.equals("all_out_todo")
                || type.equals("all_bustravel_todo") || type.equals("all_outwork_todo")) {//查询任务待办
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/task_list");
            uri = build.toString();
        } else if (type.equals("my_payment_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/payforment/my_list");
            uri = build.toString();
        } else if (type.equals("all_payment_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/payforment/all_list");
            uri = build.toString();
        } else if (type.equals("my_borrow_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/borrow/list");
            uri = build.toString();
        } else if (type.equals("all_borrow_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/borrow/stat_list");
            uri = build.toString();
        } else if (type.equals("my_purchase_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/purchase/my_list");
            uri = build.toString();
        } else if (type.equals("all_purchase_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/purchase/all_list");
            uri = build.toString();
        } else if (type.equals("all_sealuse_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/sealApp/sealApp_list");
            uri = build.toString();
        } else if (type.equals("all_overtime_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/overtime/stat_list");
            uri = build.toString();
        } else if (type.equals("my_overtime_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/overtime/list");
            uri = build.toString();
        } else if (type.equals("all_off_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/daysoff/stat_list");
            uri = build.toString();
        } else if (type.equals("my_off_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/daysoff/list");
            uri = build.toString();
        } else if (type.equals("all_leave_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/leave/stat_list");
            uri = build.toString();
        } else if (type.equals("my_leave_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/leave/list");
            uri = build.toString();
        } else if (type.equals("all_out_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/outgoing/stat_list");
            uri = build.toString();
        } else if (type.equals("my_out_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/outgoing/list");
            uri = build.toString();
        } else if (type.equals("my_bustravel_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/businesstravel/list");
            uri = build.toString();
        } else if (type.equals("all_bustravel_list")) {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/businesstravel/businesstravel_list");
            uri = build.toString();
        }else if(type.equals("my_outwork_list"))
        {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/outwork/my_list");
            uri = build.toString();
        }else if(type.equals("all_outwork_list"))
        {
            StringBuilder build = new StringBuilder(getHead());
            build.append("/openapi/outwork/all_list");
            uri = build.toString();
        }

        return uri;
    }

    //获取考情统计列表
    public static String getSignList() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/sign/get_user_list");
        return build.toString();
    }

    //流程详细
    public static String getProcessInfo() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/task_detail");
        return build.toString();
    }

    //下一步处理人
//    public static String getNextDealPeople(String type)
//    {
//    	StringBuilder build = new StringBuilder(HEAD);
//    	build.append("/openapi/").append(type).append("/get_work_user");
//    	return build.toString();
//    }
    //
    public static String getProcessTrace() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/task_comment");
        return build.toString();

    }

    //处理任务
    public static String getTaskDeal(String id, String type) {
        if (type.contains("ExpenseSale") || type.contains("ExpenseSale-suz")) {
            type = "reimbursement";
        } else if (type.contains("payForment") || type.contains("payForment-suz02") || type.contains("payForment-suz01")) {
            type = "payforment";
        } else if (type.contains("borrow")) {
            type = "borrow";
        } else if (type.contains("workOvertime")) {
            type = "overtime";
        } else if (type.contains("daysOff")) {
            type = "daysoff";
        } else if (type.contains("businessTravel")) {
            type = "businesstravel";
        } else if (type.contains("sealApp")) {
            type = "sealApp";
        } else if (type.contains("leave")) {
            type = "leave";
        } else if (type.contains("outgoing")) {
            type = "outgoing";
        } else if (type.contains("purchase")) {
            type = "purchase";
        }else if (type.contains("outwork")) {
            type = "outwork";
        }


        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/").append(type).append("/complete/" + id);
        return build.toString();
    }

    //下一步处理人
    public static String getNextWorkUser(String type) {
        if (type.contains("ExpenseSale") || type.contains("ExpenseSale-suz")) {
            type = "reimbursement";
        } else if (type.contains("payForment") || type.contains("payForment-suz02") || type.contains("payForment-suz01")) {
            type = "payforment";
        } else if (type.contains("workOvertime")) {
            type = "overtime";
        } else if (type.contains("daysOff")) {
            type = "daysoff";
        } else if (type.contains("businessTravel")) {
            type = "businesstravel";
        } else if (type.contains("borrow")) {
            type = "borrow";
        } else if (type.contains("sealApp")) {
            type = "sealApp";
        } else if (type.contains("leave")) {
            type = "leave";
        } else if (type.contains("outgoing")) {
            type = "outgoing";
        } else if (type.contains("purchase")) {
            type = "purchase";
        } else if (type.contains("outwork")) {
            type = "outwork";
        }
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/").append(type).append("/get_work_user");
        return build.toString();

    }

    //发起加班申请
    public static String getOverTimeStart() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/overtime/start");
        return build.toString();

    }

    //发起请假申请
    public static String getLeaveStart() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/leave/start");
        return build.toString();

    }

    //发起请假申请
    public static String getUpdateLeaveFile() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/leave/updateFile");
        return build.toString();

    }

    //发起请假申请
    public static String getBusinesstravelStart() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/businesstravel/start");
        return build.toString();

    }

    //发起外出申请
    public static String getOutStart() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/outgoing/start");
        return build.toString();

    }

    //发起外发申请
    public static String getOutWorkStart() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/outwork/start");
        return build.toString();

    }

    //发起出差申请
    public static String getBusinessStart() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/businesstravel/start");
        return build.toString();

    }

    //发起调休申请
    public static String getOffStart() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/daysoff/start");
        return build.toString();

    }

    //是否可以提交申请
    public static String getIsCanApply() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/borrow/has_running_borrow");
        return build.toString();

    }

    //是否有可关联的借款
    public static String getIsHaveRelateBorrow() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/borrow/show_borrow");
        return build.toString();

    }

    //是否有可关联的借款
    public static String getIsHaveRelate() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/borrow/has_borrow");
        return build.toString();

    }

    //通知列表
    public static String getNoticeList() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/notification/getNotificationList");
        return build.toString();

    }

    //获取流程
    public static String getFlowTrace() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/task_comment");
        return build.toString();

    }

    //获取小图
    public static String getSmallImage(String name, String ID, String type) {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/downLoadAttachmentSmall");
        build.append("?fileName=" + name);
        build.append("&type=" + type);
        build.append("&id=" + ID);
        return build.toString();
    }

    //下载文件
    public static String getFile(String name, String ID, String type) {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/downLoadAttachments");
        build.append("?fileName=" + name);
        build.append("&type=" + type);
        build.append("&id=" + ID);
        return build.toString();
    }

    //发布通知
    public static String getCreateNotice() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/notification/saveOrUpdateNotification");
        return build.toString();
    }

    //获取驳回流程
    public static String getRejectFlow() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/task_back_list");
        return build.toString();

    }

    //查询驳回流程
    public static String getSearchRejectFlow() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/find_task_back_list");
        return build.toString();

    }

    //获取经办流程
    public static String getFlowhandel() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/handel_list");
        return build.toString();

    }

    //查询经办流程
    public static String getSearchFlowhandel() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/find_handel_list");
        return build.toString();

    }

    //標記公告已讀
    public static String getReadNotice() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/notification/readNotification");
        return build.toString();

    }

    //获取未读公告数和未办理任务数
    public static String getNumofTask() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/get_prompt_num");
        return build.toString();

    }

    //获取签到情况
    public static String getSignInfo() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/sign/judge");
        return build.toString();
    }

    //发送签到情况
    public static String updeteSignInfo() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/sign/work");
        return build.toString();
    }

    //获取签到情况
    public static String getSignInfoList() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/sign/view");
        return build.toString();
    }

    //删除公告
    public static String getDeleteNotice() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/notification/deleteNotification");
        return build.toString();

    }

    //获取他人头像
    public static String getOtherPhoto() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/get_avatar_by_id");
        return build.toString();
    }

    //版本查询
    public static String getVersion() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/openapi/version/get_last_android_version");
        return build.toString();
    }

    //下载地址
    public static String getApkDown() {
        StringBuilder build = new StringBuilder(getHead());
        build.append("/download_app");
        return build.toString();
    }
}
